package org.yinweichen.llm_dataset_backend.repository;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.yinweichen.llm_dataset_backend.entity.EvalTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface EvalTaskRepository extends JpaRepository<EvalTask, Long> {
    @Modifying
    @Query("UPDATE EvalTask e SET e.status = :status WHERE e.id = :id")
    void updateStatusById(@Param("id") Long id, @Param("status") String status);

    List<EvalTask> findByVersion(String version);
}
